$OpenBSD: patch-libraries_Cabal_Cabal_Distribution_Simple_Register_hs,v 1.3 2014/11/22 20:23:23 kili Exp $
--- libraries/Cabal/Cabal/Distribution/Simple/Register.hs.orig	Thu Jul 10 06:34:21 2014
+++ libraries/Cabal/Cabal/Distribution/Simple/Register.hs	Sun Nov  2 21:50:32 2014
@@ -131,13 +131,14 @@ register pkg@PackageDescription { library       = Just
     let clbi = getComponentLocalBuildInfo lbi CLibName
     installedPkgInfo <- generateRegistrationInfo
                            verbosity pkg lib lbi clbi inplace distPref
+    let installedPkgInfo' = installedPkgInfo { IPI.pkgpath = pkgPath }
 
      -- Three different modes:
     case () of
-     _ | modeGenerateRegFile   -> writeRegistrationFile installedPkgInfo
-       | modeGenerateRegScript -> writeRegisterScript   installedPkgInfo
+     _ | modeGenerateRegFile   -> writeRegistrationFile installedPkgInfo'
+       | modeGenerateRegScript -> writeRegisterScript   installedPkgInfo'
        | otherwise             -> registerPackage verbosity
-                                    installedPkgInfo pkg lbi inplace packageDbs
+                                    installedPkgInfo' pkg lbi inplace packageDbs
 
   where
     modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags))
@@ -153,6 +154,7 @@ register pkg@PackageDescription { library       = Just
     packageDbs = nub $ withPackageDB lbi
                     ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
     distPref  = fromFlag (regDistPref regFlags)
+    pkgPath = fromFlag (regPkgPath regFlags)
     verbosity = fromFlag (regVerbosity regFlags)
 
     writeRegistrationFile installedPkgInfo = do
@@ -298,6 +300,7 @@ generalInstalledPackageInfo adjustRelIncDirs pkg lib c
     IPI.synopsis           = synopsis    pkg,
     IPI.description        = description pkg,
     IPI.category           = category    pkg,
+    IPI.pkgpath            = "",
     IPI.exposed            = libExposed  lib,
     IPI.exposedModules     = exposedModules lib,
     IPI.hiddenModules      = otherModules bi,
